﻿Imports System.Data.OleDb
Imports DTO
Imports BUS
Imports DAO

Public Class Thamso

    Private Sub btnluuthoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnluuthoat.Click
        Dim tsDTO As New ThamSoDTO()
        tsDTO.SoCachDung = txt_socachdung.Text
        tsDTO.SoDonVi = txt_donvitinh.Text
        tsDTO.SoLoaiBenh = txt_slloaibenh.Text
        tsDTO.SoLuongKham = txt_slbenhnhantrongngay.Text
        tsDTO.TienKham = txt_tienkham.Text
        ThamSoBUS.suathamso(tsDTO)
        Thamso_Load(sender, e)
        MessageBox.Show("Ban Da Update Thanh Cong")
        Close()
    End Sub

    Private Sub Thamso_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim dt As New DataTable
        Dim hsBus As New ThamSoBUS()
        dt = hsBus.LayBang()
        dtgv_thamso.DataSource = dt
    End Sub

    Private Sub btn_thoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Close()
    End Sub



 
End Class